<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>会诊说明</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">		
		<link rel="stylesheet" href="css/mui.min.css">
		<link rel="stylesheet" type="text/css" href="css/mui.picker.min.css" />
		<link rel="stylesheet" href="css/grandeHealth.css">
		<style>
			#submit	{color: green;}
			textarea{height: 400px;}
			.cudisable{background: #eee;}
			.mui-popup-button.mui-popup-button-bold{font-weight: normal;}
			.mui-content{margin-top:-66px}</style>

	</head>

	<body>
		<!--<header>class="mui-bar mui-bar-nav" style="display: block;height: 64px;padding-top:20px">
      		<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
      		<button type="button" disabled id="submit" style="float: right;">完成</button>
	    </header>-->
		
		<div class="mui-content">
	 		<textarea name="" rows="" placeholder="请输入会诊说明" onkeyup="this.value=this.value.replace(/[, ]/g,'')" cols=""></textarea>
		</div>

		<script src="js/jquery-1.7.2.min.js"></script>
		<script src="js/mui.min.js"></script>
		<script src="js/grandeHealth.js"></script>
		<!--公共js-->
		<script src="js/medicalRecord.js"></script>
		<script language="JavaScript" type="text/javascript">
//			console.log(document.documentElement.clientHeight)
			$('textarea').height(document.documentElement.clientHeight - 84+'px')
//			console.log($('textarea').height())
			
			/*邀请医生视角查询*/
			var zsGuid = GetLocationParam('zsGuid');//诊室guid
			if(zsGuid != ''){
				$('#submit').hide();
				$('textarea').attr('disabled',true);
			}
			function cudisable(_isNo){
				
				if(_isNo != ''){
					
					$('#submit').attr("disabled",null).removeClass('cudisable');
				}else{
					$('#submit').attr("disabled",true).addClass('cudisable');
				}
			}
			
			/*取数据*/
			function _typePd(type){
				
				if(type == '001'){
					$("textarea").val(window.localStorage.getItem('hzExplain'));
				}else{
					$("textarea").val('');
				}
			}
			_typePd(type);
			/*不为空*/
			if($("textarea").val() != ''){
				cudisable($("textarea").val());
			}
            
			/*内容空否，控制按钮高亮*/
            $("textarea").keyup(function(){
            	
		        if($(this).val() == ""){
		        	
		            cudisable($(this).val());
		            
		            /*若cont不为空，按钮可保存*/
		            if(type != ''){
						cudisable(type);
					}

		        }else{
		            cudisable($(this).val());
		        }
		    })

            $("textarea").val(window.localStorage.getItem('hzsm'));
            /*
			 *保存
			 */
			<!--mui("body").on("tap", "#submit", -->
			function submit() {
				
				var hzExplain = $("textarea").val();
				window.localStorage.setItem('hzsm',hzExplain)
				showpage('createPersonConsul.html');
				hzExplain = '';
			}
			<!--)-->
			
		</script> 
	</body>
</html>


